﻿#ifndef UDPCODEC_TURNTABLE_H
#define UDPCODEC_TURNTABLE_H

#include <qobject.h>
#include "ObjAutoInject.h"
#include "UdpCodecBase.h"

#include "LogSaver.h"

class TurnTableCodec;
class TransmitCodec;
class UdpCodec_TurnTable : public QObject,public ObjAutoInject,public UdpCodecBase
{
  Q_OBJECT
private://dependency
  TurnTableCodec* turnTableCodec=Q_NULLPTR;
  TransmitCodec* transmitCodec=Q_NULLPTR;
  LogSaver* logSaver=LogSaver::getLogSaver();
public:
  explicit UdpCodec_TurnTable();
  virtual ~UdpCodec_TurnTable();
public:
  virtual DataPackage_UdpCodec* decode(DataPackage_UdpCodec* dataPackageInfo_Device)override;
public://geter and seter
  TurnTableCodec* getTurnTableCodec()const;
  UdpCodec_TurnTable* setTurnTableCodec(TurnTableCodec* const turnTableCodec);
  TransmitCodec* getTransmitCodec()const;
  UdpCodec_TurnTable* setTransmitCodec(TransmitCodec* const transmitCodec);
public:
  virtual void objectAutoInjection(QHash<QString,QObject*>* objMap)override;
};

#endif // UDPCODEC_TURNTABLE_H
